<?php
namespace admin;
use Session;
use View;
use Redirect;
use HomeController;
use MonHoc;
class GhiChuController extends \BaseController {

	public static function ktDangNhap()
    {    	
		 if (Session::has('logined')){
	  		return true;
	  	 }
	  	else{
	  		return false;
	  	}
    }
	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function index()
	{
		//Kiểm tra đăng nhập
	 	 if (HomeController::ktDangNhap()){
	 	 	$chucnang = 'admin.ghichu';
	   		$tenchucnang ='Ghi Chú';
	  		return View::make("admin.admin")
			->with('chuc_nang',$chucnang)
			->with('ten_chuc_nang',$tenchucnang);
	  	 }
	  	else{
	  		return View::make("admin.login");
	  	}
	}

	
	/**
	 * Show the form for creating a new resource.
	 *
	 * @return Response
	 */
	public function create()
	{
		//
	}


	/**
	 * Store a newly created resource in storage.
	 *
	 * @return Response
	 */
	public function store()
	{
		//
	}


	/**
	 * Display the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function show($id)
	{
		return View::make('admin.add_monhoc');
	}


	/**
	 * Show the form for editing the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function edit($id)
	{
		//
	}


	/**
	 * Update the specified resource in storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function update($id)
	{
		//
	}


	/**
	 * Remove the specified resource from storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function destroy($id)
	{
		//
	}


}
